using Gtk;
//using MySql.Data.MySqlClient;
//using Npgsql;
using System;
using Serpis;
using System.Reflection;

namespace PArticulo
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			Assembly assembly = Assembly.Load("Npgsql, Version=2.0.0.0, Culture=neutral, PublickeyToken=5d8b90d52f46fda7"); 
			//Type type = assembly.GetType("Npgsql.NpgsqlConnection");
			
			//AppDbConnection.Instance.DbConnectionType = typeof(NpgsqlConnection);
			//AppDbConnection.Instance.DbConnectionType = typeof(NpgsqlConnection);
			//<add assembly="MySql.Data, Version=5.0.7.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/> 
			
			//AppDbConnection.Instance.DbConnectionType = type;
			AppDbConnection.Instance.DbConnectionType = assembly.GetType("Npgsql.NpgsqlConnection");
			// Este foreach nos devuelve todos los
			/*
			foreach(Type t in assembly.GetTypes())
				Console.WriteLine("Type={0}", t.FullName);
			*/
			AppDbConnection.Instance.ParameterPrefix=":";
			AppDbConnection.Instance.ConnectionString = "Server=localhost;Database=dbprueba;User Id=dbprueba;Password=sistemas";
			
			Application.Init ();
			MainWindow win = new MainWindow ();
			win.Show ();
			Application.Run ();
		}
	}
}
